package com.atguigu.gulimall.product.dao;

import java.util.List;

import com.atguigu.gulimall.product.entity.AttrEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 商品属性
 * 
 * @author leifengyang
 * @email leifengyang@gmail.com
 * @date 2019-10-01 21:08:49
 */
@Mapper
public interface AttrDao extends BaseMapper<AttrEntity> {
    // @Select({ "<script>", 
    // "SELECT attr_id FROM pms_attr WHERE attr_id IN",
    //         "<foreach collection='attrIds' item='id' separator=',' open='(' close=')'>", 
    //         "#{id}", 
    //         "</foreach>",
    //         "AND search_type = 1" })
    List<Long> selectSearchAttrIds(@Param("attrIds") List<Long> attrIds);

}
